|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.neo4j.graphalgo.GraphAlgoFactory
public abstract class GraphAlgoFactory
Static factory methods for the recommended implementations of common graph algorithms for Neo4j.
| Constructor Summary | |
|---|---|
GraphAlgoFactory()
|
|
| Method Summary | |
|---|---|
static PathFinder<org.neo4j.graphdb.Path> |
allPaths(org.neo4j.graphdb.RelationshipExpander expander,
int maxDepth)
Returns an algorithm which can find all available paths between two nodes. |
static PathFinder<org.neo4j.graphdb.Path> |
allSimplePaths(org.neo4j.graphdb.RelationshipExpander expander,
int maxDepth)
Returns an algorithm which can find all simple paths between two nodes. |
static PathFinder<WeightedPath> |
aStar(org.neo4j.graphdb.RelationshipExpander expander,
CostEvaluator<Double> lengthEvaluator,
EstimateEvaluator<Double> estimateEvaluator)
Returns an PathFinder which uses the A* algorithm to find the
cheapest path between two nodes. |
static PathFinder<WeightedPath> |
dijkstra(org.neo4j.graphdb.RelationshipExpander expander,
CostEvaluator<Double> costEvaluator)
Returns an PathFinder which uses the Dijkstra algorithm to find
the cheapest path between two nodes. |
static PathFinder<org.neo4j.graphdb.Path> |
shortestPath(org.neo4j.graphdb.RelationshipExpander expander,
int maxDepth)
Returns an algorithm which can find all shortest paths (i.e. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GraphAlgoFactory()
| Method Detail |
|---|
public static PathFinder<org.neo4j.graphdb.Path> allPaths(org.neo4j.graphdb.RelationshipExpander expander,
int maxDepth)
expander - the RelationshipExpander to use for expanding
Relationships for each Node.maxDepth - the max Path.length() returned paths are
allowed to have.
AllPaths
public static PathFinder<org.neo4j.graphdb.Path> allSimplePaths(org.neo4j.graphdb.RelationshipExpander expander,
int maxDepth)
expander - the RelationshipExpander to use for expanding
Relationships for each Node.maxDepth - the max Path.length() returned paths are
allowed to have.
AllSimplePaths
public static PathFinder<org.neo4j.graphdb.Path> shortestPath(org.neo4j.graphdb.RelationshipExpander expander,
int maxDepth)
Path.length() as possible) between two nodes. These
returned paths cannot contain loops (i.e. a node cannot occur more than
once in any returned path).
expander - the RelationshipExpander to use for expanding
Relationships for each Node.maxDepth - the max Path.length() returned paths are
allowed to have.
ShortestPath
public static PathFinder<WeightedPath> aStar(org.neo4j.graphdb.RelationshipExpander expander,
CostEvaluator<Double> lengthEvaluator,
EstimateEvaluator<Double> estimateEvaluator)
PathFinder which uses the A* algorithm to find the
cheapest path between two nodes. The definition of "cheap" is the lowest
possible cost to get from the start node to the end node, where the cost
is returned from lengthEvaluator and estimateEvaluator.
These returned paths cannot contain loops (i.e. a node cannot occur more
than once in any returned path).
See http://en.wikipedia.org/wiki/A*_search_algorithm for more
information.
expander - the RelationshipExpander to use for expanding
Relationships for each Node.lengthEvaluator - evaluator that can return the cost represented
by each relationship the algorithm traverses.estimateEvaluator - evaluator that returns an (optimistic)
estimation of the cost to get from the current node (in the traversal)
to the end node.
AStar
public static PathFinder<WeightedPath> dijkstra(org.neo4j.graphdb.RelationshipExpander expander,
CostEvaluator<Double> costEvaluator)
PathFinder which uses the Dijkstra algorithm to find
the cheapest path between two nodes. The definition of "cheap" is the
lowest possible cost to get from the start node to the end node, where
the cost is returned from costEvaluator. These returned paths
cannot contain loops (i.e. a node cannot occur more than once in any
returned path).
See http://en.wikipedia.org/wiki/Dijkstra%27s_algorithm for more
information.
expander - the RelationshipExpander to use for expanding
Relationships for each Node.costEvaluator - evaluator that can return the cost represented
by each relationship the algorithm traverses.
Dijkstra
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||